<template>
  <div>
    <markdown-it-vue
      class="md"
      :content="content"
      :options="options==null?defaultOption:options"
    ></markdown-it-vue>
  </div>
</template>

<script>
  import MarkdownItVue from 'markdown-it-vue'
  import 'markdown-it-vue/dist/markdown-it-vue.css'
  export default {
    props: {
      content: {
        type: String,
        default: '',
      },
      options: {
        type: Object,
        default: null,
      }
    },
    name: 'markdownView',
    components: {
      MarkdownItVue,
    },
    data() {
      return {
        defaultOption: {},
      }
    },
  }
</script>

<style>
  .md {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
</style>